# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>

pkgname=python-pytools
pkgver=2022.1.14
pkgrel=2
pkgdesc="A collection of tools for Python"
arch=('any')
url="https://mathema.tician.de/software/pytools"
license=('MIT')
depends=('python-numpy' 'python-platformdirs' 'python-typing_extensions')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://pypi.io/packages/source/p/pytools/pytools-$pkgver.tar.gz")
sha512sums=('3e733d54176b135b69ac9c76ac7816463c5c874f3e1cede522ab2901250822c821fd325d0d2e5f2b124aeabb93386d8c68e3c6e1b11f6119bed7953ec80f9d4d')

build() {
  cd pytools-$pkgver
  python setup.py build
}

check() {
  cd pytools-$pkgver
  python -m pytest
}

package(){
  cd pytools-$pkgver
  python setup.py install --prefix=/usr --root="$pkgdir" --skip-build --optimize=1
}
